package org.geometerplus.fbreader.formats.oeb;

import org.geometerplus.fbreader.fbreader.FBReaderApp;
import org.geometerplus.fbreader.formats.BookReader;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
import org.geometerplus.zlibrary.text.model.ZLTextModel;

/**
 * epub阅读
 * Created by huangyx on 2016.3.22.
 */
public class MEPubReader extends BookReader {

    public MEPubReader(FBReaderApp app, ZLFile file) {
        super(app, file);
    }

    @Override
    protected void onModelDataLoadedSuccess(ZLFile file, ZLTextModel model) {
        super.onModelDataLoadedSuccess(file, model);
        FBReaderApp reader = (FBReaderApp) FBReaderApp.Instance();
        if (reader != null && reader.BookTextView != null && reader.Model != null) {
            reader.BookTextView.getEpubDirData(reader.Model.TOCTree, file.getShelfBook(), true);
        }
    }
}
